package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author zhouxiangyang
 * @Date 2021/7/12 9:43
 * 用于处理和学生相关的请求
 */
@Controller
@RequestMapping("/student")  //一级路径
public class StudentController {

    /**
     * 处理保存用户的请求
     * @return 表示访问完该方法之后要跳转的页面
     */
    @RequestMapping("/save")  //http://localhost:8080/springmvc_01/student/save
    public String save(){
        System.out.println("StudentController save方法被访问了...");
        return "/success.jsp";
    }
}
